function datetodelinestr(startts,endts,prefix,suffix){
  var delinestr=prefix
  var period=endts-startts
  if(period<=60*1000){
    delinestr+="1分钟"
  }else{
    if(period<60*60*1000){
      delinestr+=Math.floor(period/(60*1000))+"分钟"
    }else{
      if(period<24*60*60*1000){
        delinestr+=Math.floor(period/(60*60*1000))+"小时"
      }else{
        if(period<30*24*60*60*1000){
          delinestr+=Math.floor(period/(24*60*60*1000))+"天"
        }else{
          if(period<12*30*24*60*60*1000){
            delinestr+=Math.floor(period/(30*24*60*60*1000))+"月"
          }else{
            delinestr+=Math.floor(period/(12*30*24*60*60*1000))+"年"
          }
        }
      }
    }
  }
  delinestr+=suffix
  return delinestr
}
module.exports={
  datetodelinestr:datetodelinestr
}